<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="common/include :: header('修改预约')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-appointment-edit" th:object="${appointment}">
			<input id="id" name="id" type="hidden" th:field="*{id}"/>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">客户名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="customerName" id="customerName" th:field="*{customerName}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">客户联系方式：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="customerPhone" id="customerPhone" th:field="*{customerPhone}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">预约时间：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="appointmentTime" id="appointmentTime" th:field="*{appointmentTime}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">车牌号码：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="licensePlate" id="licensePlate" th:field="*{licensePlate}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">汽车类型：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="carSeries" id="carSeries" th:field="*{carSeries}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">服务类型：</label>
				<div class="col-sm-8">
					<select name="serviceType">
						<option th:each="type:${@dict.getType('cmi_service_type')}"
								th:text="${type.label}"
								th:value="${type.value}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注信息：</label>
				<div class="col-sm-8">
					<textarea id="info" name="info" class="form-control">[[*{info}]]</textarea>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="common/include :: footer" />
	<th:block th:include="common/include :: datetimepicker" /><!--注意导包必须在这-->
	<script type="text/javascript">
		var prefix = ctx + "/business/appointment";
		
		function submitHandler() {
			$.operate.save(prefix + "/edit", $('#form-appointment-edit').serialize());
	    }
	</script>
	<script>
		$('#appointmentTime').datetimepicker(
				{
					format:"yyyy-mm-dd hh:ii",
					autoclose:true
				}
		)
	</script>
</body>
</html>
